/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import { Request, Response } from 'express';
import { ResponseItem, responseSuccess } from './utils';
import type { Kbdby } from '@/pages/KbyzFranchisee/index.d';
import Mock from 'mockjs';

export default {
  'POST /LogisticsPortSurvey/getSurveyData': (req: Request, res: Response, u: string) => {
    console.log(req.body);
    const data: Kbdby[] = Mock.mock({
      'list|30': [
        {
          'id|+1': 1,
          create_time: Mock.Random.datetime('yyyy-MM-dd A HH:mm:ss'),
          name: '张三',
          mobile: '13783636923',
          industry: '电商',
          use_port: '物流、云打印',
          'call_frequency|1-1000': 1000,
          hope_add_port: '物流地图',
        },
      ],
    });
    const result: ResponseItem = {
      code: 0,
      msg: '成功',
      data: data,
    };
    return res.json(result);
  },

  'GET /LogisticsPortSurvey/surveyDataDerive': (req: Request, res: Response, u: string) => {
    return res.json({
      code: 0,
      msg: '成功',
      data: 'http://upload.kuaidihelp.com/admin/logisticsPortSurvey/csv/开放平台物流接口调查.csv',
    });
  },
};
